class dog:
    numOfLegs = 4
    eyes = 2

    @staticmethod
    def showDog():
        print(f"狗都有{dog.numOfLegs}条腿，{dog.eyes}只眼睛")
        #cry()error
    def __init__(self, name, age, type):
        self.name = name
        self.age = age
        self.type = type

    def cry(self):
        print(self.name, "在叫：汪汪汪")

    def catchMouse(self, mouse):
        print("狗", self.name, "品种是", self.type, " 抓了一只老鼠", mouse)
        dog.showDog()
        print("有几条腿？",dog.numOfLegs)

if __name__=="__main__":
    dog.showDog()#不需要对象
    print(dog.numOfLegs)
    #error dog.cry()

    d=dog("旺财",300,"田园犬")
    d.cry()
    d.catchMouse("米奇")